//
//  LJMRank_sonerCollectionViewCell.m
//  wind
//
//  Created by 李金明 on 16/1/11.
//  Copyright © 2016年 李金明. All rights reserved.
//

#import "LJMRank_sonerCollectionViewCell.h"

#define HEIGHT 20

@implementation LJMRank_sonerCollectionViewCell
- (void)dealloc
{
    [_nameL release];
    [_imageV release];
    [super dealloc];
}
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self creatView];
    }
    return self;
}
- (void)creatView
{
    self.backgroundColor = [UIColor whiteColor];
    self.layer.cornerRadius = 10;
    self.layer.masksToBounds = YES;
    self.imageV = [[UIImageView alloc] init];
    self.imageV.layer.cornerRadius = 10;
    self.imageV.layer.masksToBounds = YES;
    [self addSubview:self.imageV];
    [_imageV release];
    self.nameL = [[UILabel alloc] init];
    self.nameL.backgroundColor = [UIColor whiteColor];
    self.nameL.font = [UIFont systemFontOfSize:14];
    self.nameL.textAlignment = NSTextAlignmentCenter;
    [self addSubview:self.nameL];
    [_nameL release];
    
}
- (void)layoutSubviews
{
[self.imageV mas_makeConstraints:^(MASConstraintMaker *make) {
    make.left.top.right.equalTo(self);
    make.bottom.equalTo(self.mas_bottom).offset(-HEIGHT);
}];
    [self.nameL mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.bottom.right.equalTo(self);
        make.top.equalTo(self.imageV.mas_bottom);
    }];

}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
